package com.jzo2o.customer.controller.worker;


import com.jzo2o.customer.model.dto.WorkerCertificationUpdateDTO;
import com.jzo2o.customer.model.dto.request.ServeSkillAddReqDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import com.jzo2o.customer.service.WorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 服务端 - 服务认证相关接口
 */
@RestController("workerWorkerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务认证相关接口")
public class WorkerCertificationAuditController {
    @Resource
    private WorkerCertificationAuditService workerCertificationAuditService;


    @PostMapping
    @ApiOperation("提交服务认证申请")
    public void SubmitAuthentication(@RequestBody WorkerCertificationUpdateDTO workerCertificationUpdateDTOList) {
        workerCertificationAuditService.addAuthentication(workerCertificationUpdateDTOList);

    }

    @GetMapping("/rejectReason")
    @ApiOperation("获取拒绝原因")
    public WorkerCertificationAuditResDTO getrejectReason(){
        System.out.println(workerCertificationAuditService.getReason());
        return workerCertificationAuditService.getReason();
    }
}
